package 代码记录.指定公司代码练习记录.华为_2024.分值100;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author zx
 * @create 2024-01-31 11:51
 * 自己做出来了
 */
public class 找朋友_9 {
    /**
     * 暴力解法
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] height = new int[n];
        for(int i = 0;i < n;i++){
            height[i] = sc.nextInt();
        }
        int[] res = new int[n];
        for(int i = 0;i < n;i++){
            for(int j = i + 1;j < n;j++){
                if(height[j] > height[i]){
                    res[i] = j;
                    break;
                }
            }
        }
        System.out.println(Arrays.toString(res));
    }
}
